public class Test {


    //罗马数字转整数

    public static void main(String[] args) {

    }

    public static int removeElement(int[] nums, int val) {
        if(nums == null || nums.length == 0){
            return 0;
        }
        int j = 0;
        for (int i = 0; i < nums.length; i++) {
            if(nums[i] != val){
                nums[j] = nums[i];
                j++;
            }
        }
        return j;
    }
    public static void main4(String[] args) {
        int[] arr = {1,2,5,1,4,12,1};
        int val = 1;
        int num = removeElement(arr,val);
        System.out.println(num);
      /*  4*/
    }
    public static void main3(String[] args) {
        //-5 + 0 + -6 +5.0
        //-11+5.0
        //-6.0
        System.out.println(-5 + 1/4 + 2*-3 + 5.0);
    }
    public static void main2(String[] args) {
        byte a = 127;
        byte b = 127;
        a+=b;
        System.out.println(b);
    }
    public static void main1(String[] args) {
        Double o1 = true? new Integer(1) : new Double(2.0);
        Object o2;
        if(true){
            o2 = new Integer(1);

        }else{
            o2 = new Double(2.0);

        }
        System.out.println(o1);
        System.out.println(" ");
        System.out.println(o2);
    }
}
